{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_useForkRef as useForkRef, unstable_useIsFocusVisible as useIsFocusVisible } from '@mui/utils';\nimport extractEventHandlers from '../utils/extractEventHandlers';\nexport default function useButton(parameters) {\n  const {\n    disabled = false,\n    focusableWhenDisabled,\n    href,\n    ref: externalRef,\n    tabIndex,\n    to,\n    type\n  } = parameters;\n  const buttonRef = React.useRef();\n  const [active, setActive] = React.useState(false);\n  const {\n    isFocusVisibleRef,\n    onFocus: handleFocusVisible,\n    onBlur: handleBlurVisible,\n    ref: focusVisibleRef\n  } = useIsFocusVisible();\n  const [focusVisible, setFocusVisible] = React.useState(false);\n  if (disabled && !focusableWhenDisabled && focusVisible) {\n    setFocusVisible(false);\n  }\n  React.useEffect(() => {\n    isFocusVisibleRef.current = focusVisible;\n  }, [focusVisible, isFocusVisibleRef]);\n  const [hostElementName, setHostElementName] = React.useState('');\n  const createHandleMouseLeave = otherHandlers => event => {\n    var _otherHandlers$onMous;\n    if (focusVisible) {\n      event.preventDefault();\n    }\n    (_otherHandlers$onMous = otherHandlers.onMouseLeave) == null ? void 0 : _otherHandlers$onMous.call(otherHandlers, event);\n  };\n  const createHandleBlur = otherHandlers => event => {\n    var _otherHandlers$onBlur;\n    handleBlurVisible(event);\n    if (isFocusVisibleRef.current === false) {\n      setFocusVisible(false);\n    }\n    (_otherHandlers$onBlur = otherHandlers.onBlur) == null ? void 0 : _otherHandlers$onBlur.call(otherHandlers, event);\n  };\n  const createHandleFocus = otherHandlers => event => {\n    var _otherHandlers$onFocu2;\n\n    // Fix for https://github.com/facebook/react/issues/7769\n    if (!buttonRef.current) {\n      buttonRef.current = event.currentTarget;\n    }\n    handleFocusVisible(event);\n    if (isFocusVisibleRef.current === true) {\n      var _otherHandlers$onFocu;\n      setFocusVisible(true);\n      (_otherHandlers$onFocu = otherHandlers.onFocusVisible) == null ? void 0 : _otherHandlers$onFocu.call(otherHandlers, event);\n    }\n    (_otherHandlers$onFocu2 = otherHandlers.onFocus) == null ? void 0 : _otherHandlers$onFocu2.call(otherHandlers, event);\n  };\n  const isNativeButton = () => {\n    const button = buttonRef.current;\n    return hostElementName === 'BUTTON' || hostElementName === 'INPUT' && ['button', 'submit', 'reset'].includes(button == null ? void 0 : button.type) || hostElementName === 'A' && (button == null ? void 0 : button.href);\n  };\n  const createHandleClick = otherHandlers => event => {\n    if (!disabled) {\n      var _otherHandlers$onClic;\n      (_otherHandlers$onClic = otherHandlers.onClick) == null ? void 0 : _otherHandlers$onClic.call(otherHandlers, event);\n    }\n  };\n  const createHandleMouseDown = otherHandlers => event => {\n    var _otherHandlers$onMous2;\n    if (event.target === event.currentTarget && !disabled) {\n      setActive(true);\n    }\n    (_otherHandlers$onMous2 = otherHandlers.onMouseDown) == null ? void 0 : _otherHandlers$onMous2.call(otherHandlers, event);\n  };\n  const createHandleMouseUp = otherHandlers => event => {\n    var _otherHandlers$onMous3;\n    if (event.target === event.currentTarget) {\n      setActive(false);\n    }\n    (_otherHandlers$onMous3 = otherHandlers.onMouseUp) == null ? void 0 : _otherHandlers$onMous3.call(otherHandlers, event);\n  };\n  const createHandleKeyDown = otherHandlers => event => {\n    var _otherHandlers$onKeyD;\n    (_otherHandlers$onKeyD = otherHandlers.onKeyDown) == null ? void 0 : _otherHandlers$onKeyD.call(otherHandlers, event);\n    if (event.defaultPrevented) {\n      return;\n    }\n    if (event.target === event.currentTarget && !isNativeButton() && event.key === ' ') {\n      event.preventDefault();\n    }\n    if (event.target === event.currentTarget && event.key === ' ' && !disabled) {\n      setActive(true);\n    } // Keyboard accessibility for non interactive elements\n\n    if (event.target === event.currentTarget && !isNativeButton() && event.key === 'Enter' && !disabled) {\n      var _otherHandlers$onClic2;\n      (_otherHandlers$onClic2 = otherHandlers.onClick) == null ? void 0 : _otherHandlers$onClic2.call(otherHandlers, event);\n      event.preventDefault();\n    }\n  };\n  const createHandleKeyUp = otherHandlers => event => {\n    var _otherHandlers$onKeyU;\n\n    // calling preventDefault in keyUp on a <button> will not dispatch a click event if Space is pressed\n    // https://codesandbox.io/s/button-keyup-preventdefault-dn7f0\n    if (event.target === event.currentTarget) {\n      setActive(false);\n    }\n    (_otherHandlers$onKeyU = otherHandlers.onKeyUp) == null ? void 0 : _otherHandlers$onKeyU.call(otherHandlers, event); // Keyboard accessibility for non interactive elements\n\n    if (event.target === event.currentTarget && !isNativeButton() && !disabled && event.key === ' ' && !event.defaultPrevented) {\n      var _otherHandlers$onClic3;\n      (_otherHandlers$onClic3 = otherHandlers.onClick) == null ? void 0 : _otherHandlers$onClic3.call(otherHandlers, event);\n    }\n  };\n  const updateHostElementName = React.useCallback(instance => {\n    var _instance$tagName;\n    setHostElementName((_instance$tagName = instance == null ? void 0 : instance.tagName) != null ? _instance$tagName : '');\n  }, []);\n  const handleRef = useForkRef(updateHostElementName, externalRef, focusVisibleRef, buttonRef);\n  const buttonProps = {};\n  if (hostElementName === 'BUTTON') {\n    buttonProps.type = type != null ? type : 'button';\n    if (focusableWhenDisabled) {\n      buttonProps['aria-disabled'] = disabled;\n    } else {\n      buttonProps.disabled = disabled;\n    }\n  } else if (hostElementName !== '') {\n    if (!href && !to) {\n      buttonProps.role = 'button';\n      buttonProps.tabIndex = tabIndex != null ? tabIndex : 0;\n    }\n    if (disabled) {\n      buttonProps['aria-disabled'] = disabled;\n      buttonProps.tabIndex = focusableWhenDisabled ? tabIndex != null ? tabIndex : 0 : -1;\n    }\n  }\n  const getRootProps = function () {\n    let otherHandlers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    const propsEventHandlers = extractEventHandlers(parameters);\n    const externalEventHandlers = _extends({}, propsEventHandlers, otherHandlers); // onFocusVisible can be present on the props, but since it's not a valid React event handler,\n    // it must not be forwarded to the inner component.\n\n    delete externalEventHandlers.onFocusVisible;\n    return _extends({\n      type\n    }, externalEventHandlers, buttonProps, {\n      onBlur: createHandleBlur(externalEventHandlers),\n      onClick: createHandleClick(externalEventHandlers),\n      onFocus: createHandleFocus(externalEventHandlers),\n      onKeyDown: createHandleKeyDown(externalEventHandlers),\n      onKeyUp: createHandleKeyUp(externalEventHandlers),\n      onMouseDown: createHandleMouseDown(externalEventHandlers),\n      onMouseLeave: createHandleMouseLeave(externalEventHandlers),\n      onMouseUp: createHandleMouseUp(externalEventHandlers),\n      ref: handleRef\n    });\n  };\n  return {\n    getRootProps,\n    focusVisible,\n    setFocusVisible,\n    disabled,\n    active\n  };\n}","map":{"version":3,"names":["_extends","React","unstable_useForkRef","useForkRef","unstable_useIsFocusVisible","useIsFocusVisible","extractEventHandlers","useButton","parameters","disabled","focusableWhenDisabled","href","ref","externalRef","tabIndex","to","type","buttonRef","useRef","active","setActive","useState","isFocusVisibleRef","onFocus","handleFocusVisible","onBlur","handleBlurVisible","focusVisibleRef","focusVisible","setFocusVisible","useEffect","current","hostElementName","setHostElementName","createHandleMouseLeave","otherHandlers","event","_otherHandlers$onMous","preventDefault","onMouseLeave","call","createHandleBlur","_otherHandlers$onBlur","createHandleFocus","_otherHandlers$onFocu2","currentTarget","_otherHandlers$onFocu","onFocusVisible","isNativeButton","button","includes","createHandleClick","_otherHandlers$onClic","onClick","createHandleMouseDown","_otherHandlers$onMous2","target","onMouseDown","createHandleMouseUp","_otherHandlers$onMous3","onMouseUp","createHandleKeyDown","_otherHandlers$onKeyD","onKeyDown","defaultPrevented","key","_otherHandlers$onClic2","createHandleKeyUp","_otherHandlers$onKeyU","onKeyUp","_otherHandlers$onClic3","updateHostElementName","useCallback","instance","_instance$tagName","tagName","handleRef","buttonProps","role","getRootProps","propsEventHandlers","externalEventHandlers"],"sources":["/data/messenger.client/node_modules/@mui/base/ButtonUnstyled/useButton.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_useForkRef as useForkRef, unstable_useIsFocusVisible as useIsFocusVisible } from '@mui/utils';\nimport extractEventHandlers from '../utils/extractEventHandlers';\nexport default function useButton(parameters) {\n  const {\n    disabled = false,\n    focusableWhenDisabled,\n    href,\n    ref: externalRef,\n    tabIndex,\n    to,\n    type\n  } = parameters;\n  const buttonRef = React.useRef();\n  const [active, setActive] = React.useState(false);\n  const {\n    isFocusVisibleRef,\n    onFocus: handleFocusVisible,\n    onBlur: handleBlurVisible,\n    ref: focusVisibleRef\n  } = useIsFocusVisible();\n  const [focusVisible, setFocusVisible] = React.useState(false);\n\n  if (disabled && !focusableWhenDisabled && focusVisible) {\n    setFocusVisible(false);\n  }\n\n  React.useEffect(() => {\n    isFocusVisibleRef.current = focusVisible;\n  }, [focusVisible, isFocusVisibleRef]);\n  const [hostElementName, setHostElementName] = React.useState('');\n\n  const createHandleMouseLeave = otherHandlers => event => {\n    var _otherHandlers$onMous;\n\n    if (focusVisible) {\n      event.preventDefault();\n    }\n\n    (_otherHandlers$onMous = otherHandlers.onMouseLeave) == null ? void 0 : _otherHandlers$onMous.call(otherHandlers, event);\n  };\n\n  const createHandleBlur = otherHandlers => event => {\n    var _otherHandlers$onBlur;\n\n    handleBlurVisible(event);\n\n    if (isFocusVisibleRef.current === false) {\n      setFocusVisible(false);\n    }\n\n    (_otherHandlers$onBlur = otherHandlers.onBlur) == null ? void 0 : _otherHandlers$onBlur.call(otherHandlers, event);\n  };\n\n  const createHandleFocus = otherHandlers => event => {\n    var _otherHandlers$onFocu2;\n\n    // Fix for https://github.com/facebook/react/issues/7769\n    if (!buttonRef.current) {\n      buttonRef.current = event.currentTarget;\n    }\n\n    handleFocusVisible(event);\n\n    if (isFocusVisibleRef.current === true) {\n      var _otherHandlers$onFocu;\n\n      setFocusVisible(true);\n      (_otherHandlers$onFocu = otherHandlers.onFocusVisible) == null ? void 0 : _otherHandlers$onFocu.call(otherHandlers, event);\n    }\n\n    (_otherHandlers$onFocu2 = otherHandlers.onFocus) == null ? void 0 : _otherHandlers$onFocu2.call(otherHandlers, event);\n  };\n\n  const isNativeButton = () => {\n    const button = buttonRef.current;\n    return hostElementName === 'BUTTON' || hostElementName === 'INPUT' && ['button', 'submit', 'reset'].includes(button == null ? void 0 : button.type) || hostElementName === 'A' && (button == null ? void 0 : button.href);\n  };\n\n  const createHandleClick = otherHandlers => event => {\n    if (!disabled) {\n      var _otherHandlers$onClic;\n\n      (_otherHandlers$onClic = otherHandlers.onClick) == null ? void 0 : _otherHandlers$onClic.call(otherHandlers, event);\n    }\n  };\n\n  const createHandleMouseDown = otherHandlers => event => {\n    var _otherHandlers$onMous2;\n\n    if (event.target === event.currentTarget && !disabled) {\n      setActive(true);\n    }\n\n    (_otherHandlers$onMous2 = otherHandlers.onMouseDown) == null ? void 0 : _otherHandlers$onMous2.call(otherHandlers, event);\n  };\n\n  const createHandleMouseUp = otherHandlers => event => {\n    var _otherHandlers$onMous3;\n\n    if (event.target === event.currentTarget) {\n      setActive(false);\n    }\n\n    (_otherHandlers$onMous3 = otherHandlers.onMouseUp) == null ? void 0 : _otherHandlers$onMous3.call(otherHandlers, event);\n  };\n\n  const createHandleKeyDown = otherHandlers => event => {\n    var _otherHandlers$onKeyD;\n\n    (_otherHandlers$onKeyD = otherHandlers.onKeyDown) == null ? void 0 : _otherHandlers$onKeyD.call(otherHandlers, event);\n\n    if (event.defaultPrevented) {\n      return;\n    }\n\n    if (event.target === event.currentTarget && !isNativeButton() && event.key === ' ') {\n      event.preventDefault();\n    }\n\n    if (event.target === event.currentTarget && event.key === ' ' && !disabled) {\n      setActive(true);\n    } // Keyboard accessibility for non interactive elements\n\n\n    if (event.target === event.currentTarget && !isNativeButton() && event.key === 'Enter' && !disabled) {\n      var _otherHandlers$onClic2;\n\n      (_otherHandlers$onClic2 = otherHandlers.onClick) == null ? void 0 : _otherHandlers$onClic2.call(otherHandlers, event);\n      event.preventDefault();\n    }\n  };\n\n  const createHandleKeyUp = otherHandlers => event => {\n    var _otherHandlers$onKeyU;\n\n    // calling preventDefault in keyUp on a <button> will not dispatch a click event if Space is pressed\n    // https://codesandbox.io/s/button-keyup-preventdefault-dn7f0\n    if (event.target === event.currentTarget) {\n      setActive(false);\n    }\n\n    (_otherHandlers$onKeyU = otherHandlers.onKeyUp) == null ? void 0 : _otherHandlers$onKeyU.call(otherHandlers, event); // Keyboard accessibility for non interactive elements\n\n    if (event.target === event.currentTarget && !isNativeButton() && !disabled && event.key === ' ' && !event.defaultPrevented) {\n      var _otherHandlers$onClic3;\n\n      (_otherHandlers$onClic3 = otherHandlers.onClick) == null ? void 0 : _otherHandlers$onClic3.call(otherHandlers, event);\n    }\n  };\n\n  const updateHostElementName = React.useCallback(instance => {\n    var _instance$tagName;\n\n    setHostElementName((_instance$tagName = instance == null ? void 0 : instance.tagName) != null ? _instance$tagName : '');\n  }, []);\n  const handleRef = useForkRef(updateHostElementName, externalRef, focusVisibleRef, buttonRef);\n  const buttonProps = {};\n\n  if (hostElementName === 'BUTTON') {\n    buttonProps.type = type != null ? type : 'button';\n\n    if (focusableWhenDisabled) {\n      buttonProps['aria-disabled'] = disabled;\n    } else {\n      buttonProps.disabled = disabled;\n    }\n  } else if (hostElementName !== '') {\n    if (!href && !to) {\n      buttonProps.role = 'button';\n      buttonProps.tabIndex = tabIndex != null ? tabIndex : 0;\n    }\n\n    if (disabled) {\n      buttonProps['aria-disabled'] = disabled;\n      buttonProps.tabIndex = focusableWhenDisabled ? tabIndex != null ? tabIndex : 0 : -1;\n    }\n  }\n\n  const getRootProps = (otherHandlers = {}) => {\n    const propsEventHandlers = extractEventHandlers(parameters);\n\n    const externalEventHandlers = _extends({}, propsEventHandlers, otherHandlers); // onFocusVisible can be present on the props, but since it's not a valid React event handler,\n    // it must not be forwarded to the inner component.\n\n\n    delete externalEventHandlers.onFocusVisible;\n    return _extends({\n      type\n    }, externalEventHandlers, buttonProps, {\n      onBlur: createHandleBlur(externalEventHandlers),\n      onClick: createHandleClick(externalEventHandlers),\n      onFocus: createHandleFocus(externalEventHandlers),\n      onKeyDown: createHandleKeyDown(externalEventHandlers),\n      onKeyUp: createHandleKeyUp(externalEventHandlers),\n      onMouseDown: createHandleMouseDown(externalEventHandlers),\n      onMouseLeave: createHandleMouseLeave(externalEventHandlers),\n      onMouseUp: createHandleMouseUp(externalEventHandlers),\n      ref: handleRef\n    });\n  };\n\n  return {\n    getRootProps,\n    focusVisible,\n    setFocusVisible,\n    disabled,\n    active\n  };\n}"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,mBAAmB,IAAIC,UAAU,EAAEC,0BAA0B,IAAIC,iBAAiB,QAAQ,YAAY;AAC/G,OAAOC,oBAAoB,MAAM,+BAA+B;AAChE,eAAe,SAASC,SAAS,CAACC,UAAU,EAAE;EAC5C,MAAM;IACJC,QAAQ,GAAG,KAAK;IAChBC,qBAAqB;IACrBC,IAAI;IACJC,GAAG,EAAEC,WAAW;IAChBC,QAAQ;IACRC,EAAE;IACFC;EACF,CAAC,GAAGR,UAAU;EACd,MAAMS,SAAS,GAAGhB,KAAK,CAACiB,MAAM,EAAE;EAChC,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGnB,KAAK,CAACoB,QAAQ,CAAC,KAAK,CAAC;EACjD,MAAM;IACJC,iBAAiB;IACjBC,OAAO,EAAEC,kBAAkB;IAC3BC,MAAM,EAAEC,iBAAiB;IACzBd,GAAG,EAAEe;EACP,CAAC,GAAGtB,iBAAiB,EAAE;EACvB,MAAM,CAACuB,YAAY,EAAEC,eAAe,CAAC,GAAG5B,KAAK,CAACoB,QAAQ,CAAC,KAAK,CAAC;EAE7D,IAAIZ,QAAQ,IAAI,CAACC,qBAAqB,IAAIkB,YAAY,EAAE;IACtDC,eAAe,CAAC,KAAK,CAAC;EACxB;EAEA5B,KAAK,CAAC6B,SAAS,CAAC,MAAM;IACpBR,iBAAiB,CAACS,OAAO,GAAGH,YAAY;EAC1C,CAAC,EAAE,CAACA,YAAY,EAAEN,iBAAiB,CAAC,CAAC;EACrC,MAAM,CAACU,eAAe,EAAEC,kBAAkB,CAAC,GAAGhC,KAAK,CAACoB,QAAQ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